<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<fmt:requestEncoding value="UTF-8" />
<%--根据请求参数中的locale来设置Locale--%>
<fmt:setLocale value="${ param.locale }" />
<%--指定资源文件的基础名称(basename)--%>
<fmt:setBundle basename="login" />

<html>
  <head>
      <title>
          <fmt:message key="login.title" />
      </title>
  </head>
  <body>

    <form action="#">
        <p>
            <label for="username">
                <fmt:message key="login.username" />
            </label>
            <input type="text" name="username" id="username">
        </p>
        <p>
            <label for="password">
                <fmt:message key="login.password" />
            </label>
            <input type="password" name="password" id="password">
        </p>
        <p>
            <button type="submit">
                <fmt:message key="login.submit" />
            </button>
        </p>
    </form>

  </body>
</html>
